Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alter sonobi unit test to fix Edge test failure #2904

Merged
merged 2 commits into from
Jul 27, 2018

Conversation

jsnellbaker
Copy link
Collaborator

@jsnellbaker jsnellbaker commented Jul 27, 2018

Type of change

  • Other

Description of change

After #2891 was merged into master, Travis began reporting test failures in the sonobiBidAdapter_spec.js file for a unit test in Edge.

See link below:
https://travis-ci.org/prebid/Prebid.js/builds/408728279?utm_source=slack&utm_medium=notification

This PR fixes the error by standardizing the ref href URL the unit test utilizes to just the domain (since random numbers are sometimes added in the url when running browserstack).

@@ -318,6 +318,10 @@ describe('SonobiBidAdapter', () => {

it('should map bidResponse to prebidResponse', () => {
const response = spec.interpretResponse(bidResponse, bidRequests);
response.forEach(resp => {
let regx = /http:\/\/localhost:9876\/.*?(?="|$)/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure hardcoded the port is a good way to prevent this error. I'm not sure but some process is generating the port (karma?) and we should probably use whatever it is assigning or figure out another way to prevent this test case failure.

Copy link
Collaborator Author

@jsnellbaker jsnellbaker Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like we discussed offline - I removed the port values from the unit tests. Please take another look when possible.

@jsnellbaker jsnellbaker merged commit 58ce989 into master Jul 27, 2018
@jsnellbaker jsnellbaker deleted the sonobi_unit_test_fix branch August 2, 2018 14:37
florevallatmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Sep 6, 2018
* alter unit test to fix Edge test failure

* removing port from unit test
StefanWallin pushed a commit to mittmedia/Prebid.js that referenced this pull request Sep 28, 2018
* alter unit test to fix Edge test failure

* removing port from unit test
ghost pushed a commit to devunrulymedia/Prebid.js that referenced this pull request Jan 30, 2019
* alter unit test to fix Edge test failure

* removing port from unit test
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
* alter unit test to fix Edge test failure

* removing port from unit test
AlessandroDG pushed a commit to simplaex/Prebid.js that referenced this pull request Mar 26, 2019
* alter unit test to fix Edge test failure

* removing port from unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants